//
//  LeftSideCell.m
//  SIqICalendar
//
//  Created by sunjiawen on 17/3/9.
//  Copyright © 2017年 sjw. All rights reserved.
//

#import "LeftSideCell.h"

@implementation LeftSideCell
+ (instancetype)cellWithTableView:(UITableView *)tableView {
    static NSString *cellid = @"leftSideCellID";
    LeftSideCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid];
    
    if (cell == nil) {
        cell = [[LeftSideCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellid];
    }
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.isdefaultIcon = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"is_default"]];
        [self.contentView addSubview:self.isdefaultIcon];
        
        [self.isdefaultIcon makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.textLabel.right).offset(4);
            make.width.height.equalTo(20);
            make.centerY.equalTo(self.contentView.centerY);
        }];
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
